
import {getMenuList}  from  '../../../util/axios'

const  state={
   
    menuList:[]
}


const  mutations={
    REQ_MENULIST(state,payload){

        state.menuList=payload
    }
  
}
const  actions={

    getMenuListAction({commit}){

        getMenuList()
        .then(res=>{
              console.log(res,'111111111111111');
            // let  list=res.data.list?res.data.list:[]
         if(res.data.code==200){
            commit('REQ_MENULIST',res.data.list)
    
           
         }
           
            
        }
            
        )
    }
}

const  getters = {

      getMenuList(state){
          return state.menuList
      }
}


export  default {
state,
mutations,
getters,
actions,
namespaced:true


}